1. Field of the Invention
The present invention relates to a rendering apparatus and method and, particularly, to a rendering apparatus and method which converts apex data of a polygon in a three-dimensional space into data on a coordinate system corresponding to a given display area and renders the polygon based on the converted data.
2. Description of the Related Art
With the recent development of the semiconductor technologies, the processing ability of computing devices for image processing has been improved.
In the computer graphics, one method for displaying a three-dimensional object on a display device is to express the three-dimensional object by utilizing a plurality of two-dimensional figures (polygons) of a predetermined fundamental form (for instance, a triangle). As shown in FIG. 1A, such a three-dimensional object is defined on an object coordinate system that is set on an object-by-object basis.
For example, when a moving picture is generated in accordance with an operation of an object according to a given application program, the object, the background, etc. that constitute each frame is rendered from one frame to another.
In this case, for each frame, data in a three-dimensional space of each apex of polygons corresponding to the object that constitutes the frame is converted into data on a device coordinate system that corresponds to a two-dimensional display area and then the polygons are rendered based on the converted data.
In the above conversion, first, coordinates of each apex in a three-dimensional world coordinate system (see FIG. 1B) are converted into coordinates on an eye coordinate system (see FIG. 1C) having a viewing point as the origin (perspective transformation).
Then, a view volume that is a region (space) in the eye coordinate system to be displayed in the display area is set. As shown in FIG. 2A, the view volume is a hexahedron that is part of a quadratic pyramid having the viewing point as the top apex.
To simplify a judgment as to whether each apex of polygons exists in the view volume, coordinate conversion (clip conversion) is performed to convert the view volume into a rectangular parallelepiped as shown in FIG. 2B.
After a clip process is executed by using the rectangular parallelepiped as the view volume, the coordinates of each apex are converted into the device coordinate system corresponding to the display area (view port conversion).
Further, a normal vector of each apex of polygons is subjected to perspective transformation, and color data of each apex is calculated from transformed data.
As described above, the coordinates of each apex of polygons are subjected to perspective transformation, clip conversion, and view port conversion, and color data of the apex is calculated from a normal vector of the apex.
However, since data (coordinates and color data) of the apices of polygons are converted through the above described computation on a frame-by-frame basis, the amount of computation is enormous. Where the rendering is performed at a given processing speed, the above computation accounts for a large part of the rendering process. This causes problems that a computing circuit dedicated to the above computation is necessary and that it is difficult to reduce the cost of the apparatus.